<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<!--框架必需start-->
	<script type="text/javascript" src="<%=basePath%>libs/js/jquery.js"></script>
	<script type="text/javascript" src="<%=basePath%>libs/js/framework.js"></script>
	<link href="<%=basePath%>libs/css/import_basic.css" rel="stylesheet" type="text/css"/>
	<link rel="stylesheet" type="text/css" id="skin" prePath="<%=basePath%>"/>
	<link rel="stylesheet" type="text/css" id="customSkin"/>
	<link rel="stylesheet" type="text/css" href="<%=basePath%>css/pagestyle.css" />
<!--框架必需end-->

<!--弹窗函数start-->
<script>
function openWin(){
	var diag = new top.Dialog();
	diag.Title = "添加角色";
	diag.URL = "Userrole_addPage.action";
	diag.Width=500;
	diag.Height=180;
	diag.show();
}
$(function(){
		top.Dialog.close();
	})
	
function purview(id){
	window.location='Userrole_purview.action?id='+id;
}
</script>
<!--弹窗函数end-->
</head>
<body>
<div id="scrollContent">
	<div class="box2" panelTitle="角色列表" roller="true">
		<div class="rbox_topcenter" style="margin-bottom:5px">
		<table border="0" cellpadding="0" cellspacing="0">
			<tr>
				<td>
					<button onclick='openWin()'><span class="icon_page">创建角色</span></button>
				</td>
			</tr>
		</table>
	</div>
		<table class="tableStyle" style="width:800px">
			<tr>
				<th>角色名</th>
				<th>角色描述</th>
				<th>操作</th>
			</tr>
			<s:iterator value="pageBean.list">
				<tr>
					<td><s:property value="rolename"/></td>
					<td><s:property value="description"/></td>
					<td>
						<input type="button" value="权限指派 " onclick='purview(<s:property value="id"/>);'/>		
						<input type="button" value="删除 " onclick='top.Dialog.confirm("确定要删除此项吗？",function(){window.location="Userrole_delete.action?id=<s:property value="id"/>"});'/>		
					</td>
				</tr>
			</s:iterator>
		</table>
	</div>
</div>						
</body>
</html>